import ajax from "../ajax";
import Service from "../service";

class LoginServer extends Service {
  public async getCaptcha(): Promise<string | ArrayBufferLike> {
    const result = await ajax({
      method: "get",
      url: `/api/acl/user/getCode?${Math.random()}`,
      responseType: "arraybuffer",
    });
    return result?.data;
  }
}

export default new LoginServer();
